namespace Agro.Models {
        using System;
        using SN.Data;
        
        
        /// <summary>
        /// 表名：T_Role_Permission 主键列：RP_RoleID,RP_Type,RP_TableID,RP_IsLook
        /// </summary>
        [SerializableAttribute()]
        public partial class T_Role_Permission : Entity {
            
            protected Int32 _RP_RoleID;
            
            protected String _RP_Type;
            
            protected String _RP_TableID;
            
            protected String _RP_IsLook;
            
            protected String _RP_CreateUserID;
            
            protected String _RP_CreateDate;
            
            protected String _RP_CreateIP;
            
            /// <summary>
            /// 角色表ID
            /// </summary>
            public Int32 RP_RoleID {
                get {
                    return this._RP_RoleID;
                }
                set {
                    this.OnPropertyValueChange(_.RP_RoleID, _RP_RoleID, value);
                    this._RP_RoleID = value;
                }
            }
            
            /// <summary>
            /// report代表报表  menu代表菜单 report_edit代表报表填报 report_check代表审核  report_submit代表确认提交
            /// </summary>
            public String RP_Type {
                get {
                    return this._RP_Type;
                }
                set {
                    this.OnPropertyValueChange(_.RP_Type, _RP_Type, value);
                    this._RP_Type = value;
                }
            }
            
            /// <summary>
            /// 可以使T_Report表中的Report_ID,也可以是T_Menu表中的Menu_I
            /// </summary>
            public String RP_TableID {
                get {
                    return this._RP_TableID;
                }
                set {
                    this.OnPropertyValueChange(_.RP_TableID, _RP_TableID, value);
                    this._RP_TableID = value;
                }
            }
            
            /// <summary>
            /// 0不可查看  1可查看
            /// </summary>
            public String RP_IsLook {
                get {
                    return this._RP_IsLook;
                }
                set {
                    this.OnPropertyValueChange(_.RP_IsLook, _RP_IsLook, value);
                    this._RP_IsLook = value;
                }
            }
            
            /// <summary>
            /// 创建人员
            /// </summary>
            public String RP_CreateUserID {
                get {
                    return this._RP_CreateUserID;
                }
                set {
                    this.OnPropertyValueChange(_.RP_CreateUserID, _RP_CreateUserID, value);
                    this._RP_CreateUserID = value;
                }
            }
            
            /// <summary>
            /// 创建时间
            /// </summary>
            public String RP_CreateDate {
                get {
                    return this._RP_CreateDate;
                }
                set {
                    this.OnPropertyValueChange(_.RP_CreateDate, _RP_CreateDate, value);
                    this._RP_CreateDate = value;
                }
            }
            
            /// <summary>
            /// 创建IP
            /// </summary>
            public String RP_CreateIP {
                get {
                    return this._RP_CreateIP;
                }
                set {
                    this.OnPropertyValueChange(_.RP_CreateIP, _RP_CreateIP, value);
                    this._RP_CreateIP = value;
                }
            }
            
            /// <summary>
            /// 获取实体对应的表名
            /// </summary>
            protected override Table GetTable() {
                return new Table<T_Role_Permission>("T_Role_Permission");
            }
            
            /// <summary>
            /// 获取实体中的主键列
            /// </summary>
            protected override Field[] GetPrimaryKeyFields() {
                return new Field[] {
                        _.RP_RoleID,
                        _.RP_Type,
                        _.RP_TableID,
                        _.RP_IsLook};
            }
            
            /// <summary>
            /// 获取列信息
            /// </summary>
            protected override Field[] GetFields() {
                return new Field[] {
                        _.RP_RoleID,
                        _.RP_Type,
                        _.RP_TableID,
                        _.RP_IsLook,
                        _.RP_CreateUserID,
                        _.RP_CreateDate,
                        _.RP_CreateIP};
            }
            
            /// <summary>
            /// 获取列数据
            /// </summary>
            protected override object[] GetValues() {
                return new object[] {
                        this._RP_RoleID,
                        this._RP_Type,
                        this._RP_TableID,
                        this._RP_IsLook,
                        this._RP_CreateUserID,
                        this._RP_CreateDate,
                        this._RP_CreateIP};
            }
            
            /// <summary>
            /// 给当前实体赋值
            /// </summary>
            protected override void SetValues(IRowReader reader) {
                if ((false == reader.IsDBNull(_.RP_RoleID))) {
                    this._RP_RoleID = reader.GetInt32(_.RP_RoleID);
                }
                if ((false == reader.IsDBNull(_.RP_Type))) {
                    this._RP_Type = reader.GetString(_.RP_Type);
                }
                if ((false == reader.IsDBNull(_.RP_TableID))) {
                    this._RP_TableID = reader.GetString(_.RP_TableID);
                }
                if ((false == reader.IsDBNull(_.RP_IsLook))) {
                    this._RP_IsLook = reader.GetString(_.RP_IsLook);
                }
                if ((false == reader.IsDBNull(_.RP_CreateUserID))) {
                    this._RP_CreateUserID = reader.GetString(_.RP_CreateUserID);
                }
                if ((false == reader.IsDBNull(_.RP_CreateDate))) {
                    this._RP_CreateDate = reader.GetString(_.RP_CreateDate);
                }
                if ((false == reader.IsDBNull(_.RP_CreateIP))) {
                    this._RP_CreateIP = reader.GetString(_.RP_CreateIP);
                }
            }
            
            public override int GetHashCode() {
                return base.GetHashCode();
            }
            
            public override bool Equals(object obj) {
                if ((obj == null)) {
                    return false;
                }
                if ((false == typeof(T_Role_Permission).IsAssignableFrom(obj.GetType()))) {
                    return false;
                }
                if ((((object)(this)) == ((object)(obj)))) {
                    return true;
                }
                return false;
            }
            
            public class _ {
                
                /// <summary>
                /// 表示选择所有列，与*等同
                /// </summary>
                public static AllField All = new AllField<T_Role_Permission>();
                
                /// <summary>
                /// 角色表ID - 字段名：RP_RoleID - 数据类型：Int32
                /// </summary>
                public static Field RP_RoleID = new Field<T_Role_Permission>("RP_RoleID");
                
                /// <summary>
                /// report代表报表  menu代表菜单 report_edit代表报表填报 report_check代表审核  report_submit代表确认提交 - 字段名：RP_Type - 数据类型：String
                /// </summary>
                public static Field RP_Type = new Field<T_Role_Permission>("RP_Type");
                
                /// <summary>
                /// 可以使T_Report表中的Report_ID,也可以是T_Menu表中的Menu_I - 字段名：RP_TableID - 数据类型：String
                /// </summary>
                public static Field RP_TableID = new Field<T_Role_Permission>("RP_TableID");
                
                /// <summary>
                /// 0不可查看  1可查看 - 字段名：RP_IsLook - 数据类型：String
                /// </summary>
                public static Field RP_IsLook = new Field<T_Role_Permission>("RP_IsLook");
                
                /// <summary>
                /// 创建人员 - 字段名：RP_CreateUserID - 数据类型：String
                /// </summary>
                public static Field RP_CreateUserID = new Field<T_Role_Permission>("RP_CreateUserID");
                
                /// <summary>
                /// 创建时间 - 字段名：RP_CreateDate - 数据类型：String
                /// </summary>
                public static Field RP_CreateDate = new Field<T_Role_Permission>("RP_CreateDate");
                
                /// <summary>
                /// 创建IP - 字段名：RP_CreateIP - 数据类型：String
                /// </summary>
                public static Field RP_CreateIP = new Field<T_Role_Permission>("RP_CreateIP");
            }
        }
    }
    